package com.neusoft.classch76;

public class ComputerStudent extends Student {

	// 新增属性
	//专业
	static final String MAJOR = "computer";
	//专业人数 及学号分配属性
	static int comSum =0;
	// 操作能力
	private double operationScore;
	// 英语写作成绩
	private double engWritingScore;

	// 方法
	@Override
	public double calculateOverall() {
		double overall = getScoreOfMidTerm()*0.2+getScoreOfFinal()*0.2+engWritingScore*0.2+ operationScore *0.4;
		super.setOverall(overall);
		return overall;
	}
	
	
	
	@Override
	public void printOverall() {
		System.out.println("学号："+getStuNo()+" 姓名："+getStuName()
		+" 性别："+getStuGender()+" 年龄："+getStuAge()
		+"期中成绩"+getScoreOfMidTerm()+"期末成绩"+getScoreOfFinal()
		+"操作能力"+operationScore+"写作成绩"+engWritingScore
		+" 综合成绩："+this.calculateOverall());
	}



	// 构造方法
	public ComputerStudent() {
		super();
		// TODO Auto-generated constructor stub
	}

	

	public ComputerStudent(String stuName, String stuNo, String stuGender, int stuAge, double scoreOfMidTerm,
			double scoreOfFinal, double operationScore, double engWritingScore) {
		super(stuName, stuNo, stuGender, stuAge, scoreOfMidTerm, scoreOfFinal);
		this.operationScore = operationScore;
		this.engWritingScore = engWritingScore;
	}

	// get&set方法
	public double getOperationScore() {
		return operationScore;
	}

	public void setOperationScore(double operationScore) {
		this.operationScore = operationScore;
	}

	public double getEngWritingScore() {
		return engWritingScore;
	}

	public void setEngWritingScore(double engWritingScore) {
		this.engWritingScore = engWritingScore;
	}
}
